# Contributor: Leo <thinkabit.ukim@gmail.com>
# Maintainer: Patrycja Rosa <alpine@ptrcnull.me>
pkgname=py3-typing-extensions
pkgver=4.12.2
pkgrel=0
pkgdesc="Backported and Experimental Type Hints for Python 3.5+"
url="https://github.com/python/typing_extensions"
arch="noarch"
license="Python-2.0"
makedepends="py3-gpep517 py3-flit-core"
checkdepends="python3-tests"
subpackages="$pkgname-pyc"
source="https://github.com/python/typing_extensions/archive/$pkgver/typing_extensions-$pkgver.tar.gz"
builddir="$srcdir/typing_extensions-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	gpep517 install-wheel --destdir .testenv --prefix '' .dist/*.whl
	.testenv/bin/python3 src/test_typing_extensions.py
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/typing_extensions-$pkgver-py3-none-any.whl
}

sha512sums="
925f5936faeec2a799b42e555900fa7121fb3841f80dfbbdc931abe76b1ea6e600c5fe9b1f91dfb43ae049d60bc7ed9f12e2c25be6f9bcc7b32bbbbdda3055d6  typing_extensions-4.12.2.tar.gz
"
